from peewee import Model, ForeignKeyField
from app.extensions import db
from app.models.user import User
from app.models.movie import Movie

class Favorite(Model):
    user = ForeignKeyField(User, backref='favorites')
    movie = ForeignKeyField(Movie)

    class Meta:
        database = db
        table_name = 'user_favorites'
